import SvBase from './SvBase'

export default class ElPanel extends SvBase {

  //样式
  style = {
    "background-color": "#ddffff!important",
    padding: "14px",
    "border-left": "6px solid #ccc!important",
    "border-color": "#2196F3!important",
    "display": "inline-block"
  };

  canvas;

  init() {
    this.canvas.on('change.windowSize', this.changeSize)
  }

  changeSize(w, h) {
    if (h < 200) {
      h = 200;
    }
    if (h > 800) {
      h = 800;
    }
    if (w < 600) {
      w = 600;
    }
    if (w > 900) {
      w = 900;
    }
    this.style.height = h / 2 + 'px';
    this.style.width = w / 3 + 'px';
    this.update()
  }

};
